package com.qf.spring01.service.impl;


import com.qf.spring01.entity.User;
import com.qf.spring01.service.UserService;

public class UserServiceimpl implements UserService {

    private String name;

    public UserServiceimpl() {
        System.out.println("1.调用无参构造");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        System.out.println("2.注入依赖");
        this.name = name;
    }

    public void init(){
        System.out.println("4.初始出方法");
    }
    public void destroy(){
        System.out.println("6.销毁对象");
    }
    @Override
    public void save() {
        System.out.println("我是要成为海贼王的男人");
        /*int i = 1/0;*/
    }

    @Override
    public User getUser(User user) {
        return null;
    }
}
